<?php

class UserDAO extends DB{
    
    var $table_name = 'user';
    var $columns = array ('id','username','email','rating','password');
    
    function create($data){
        $sql = 'INSERT INTO `'.$table_name.'` (`'.implode('`,`',$columns).'`) VALUES (null,?,?,null,?)';
        
        $stmt = $this->getStmt($sql);
        
        $stmt->bind_param('sss',$data['username'],$data['email'],$data['password']);
        $this->_execute($stmt);
        
    }
}
?>